<script lang="ts" setup>
import LoginForm from './LoginForm.vue'
import { AppLogo } from '@/components/Application'

import { useDesign } from '@/hooks/web/useDesign'

defineProps({
  sessionTimeout: {
    type: Boolean,
  },
})

const { prefixCls } = useDesign('login')
</script>

<template>
  <div :class="prefixCls" class="warp relative h-full min-h-full w-full overflow-hidden px-4">
    <div class="relative mx-auto h-full flex flex-col-reverse container">
      <div class="h-full w-full flex">
        <div class="hidden min-h-full w-full flex flex-col-reverse" />
        <div class="mr-[140px] h-full w-full flex flex-1">
          <AppLogo :show-title="false" class="mb-[52px] mt-[102px]" />
          <!-- eslint-disable max-len -->
          <div
            class="relative my-auto h-[468px] w-[428px] rounded-md bg-[#fff]"
          >
            <LoginForm />
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style lang="less">
@prefix-cls: ~'@{namespace}-login';
@logo-prefix-cls: ~'@{namespace}-app-logo';
@countdown-prefix-cls: ~'@{namespace}-countdown-input';
@dark-bg: #293146;

.warp{
    width: 100vw;
  height: 100vh;
  background-image: url('@/assets//images/login/login-bgc.png');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: cover;

}

html[data-theme='dark'] {
  .@{prefix-cls} {
    background-color: @dark-bg;

    &::before {
      background-image: url('@/assets/svg/login-bg-dark.svg');
    }

    .ant-input,
    .ant-input-password {
      background-color: #232a3b;
    }

    .ant-btn:not(.ant-btn-link, .ant-btn-primary) {
      border: 1px solid #4a5569;
    }

    &-form {
      background: transparent !important;
    }

    .app-iconify {
      color: #fff;
    }
  }

  input.fix-auto-fill,
  .fix-auto-fill input {
    -webkit-text-fill-color: #c9d1d9 !important;
    box-shadow: inherit !important;
  }
}

.@{prefix-cls} {
  /* stylelint-disable-next-line media-query-no-invalid */
  @media (max-width: @screen-xl) {
    background-color: #293146;

    .@{prefix-cls}-form {
      background-color: #fff;
    }
  }

  .@{logo-prefix-cls} {
    position: absolute;
    top: 12px;
    height: 30px;

    &__title {
      font-size: 16px;
      color: #fff;
    }

    img {
      width: 32px;
    }
  }

  .container {
    .@{logo-prefix-cls} {
      display: flex;
      justify-content: center;
      width: 428px;
      height: 80px;

      &__title {
        font-size: 24px;
        color: #fff;
      }

      img {
      width: 174px;
      height:74px;
      object-fit: contain;
      }
    }
  }

  &-sign-in-way {
    .anticon {
      font-size: 22px;
      color: #888;
      cursor: pointer;
    }
  }

  .@{countdown-prefix-cls} input {
    min-width: unset;
  }

  .ant-divider-inner-text {
    font-size: 12px;
  }
}
</style>
